package com.nbicc.newscat.po;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@ApiModel(value="新闻与目录的关系",description = "新闻可以算多个目录下(当然也包含一对一)")
@Data
public class NewsCat {

    public final static String FIELD_NEWS_ID = "newsId";
    public final static String FIELD_CAT_ID= "catId";

    @ApiModelProperty(value="关系自增id")
    private int id;
    @ApiModelProperty(value="新闻id")
    @JsonSerialize(using= ToStringSerializer.class)
    private long newsId;
    @ApiModelProperty(value="目录id")
    private int catId;

}
